home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir31
/
weird1sb.zip
/
WEIRD.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-12-28
|
2KB
|
92 lines
@echo off
if "%1" == "" goto syntax
fe ( %1 ) do if $i:u == ON ret 1 ; if $i:u == OFF ret 2 ; ret 0
if errorlevel 2 goto weirdoff
if errorlevel 1 goto weirdon
goto syntax
:weirdon
fm -qs
if errorlevel 1 goto fmloaded
fm -qn64i
fm -qs
if errorlevel 1 goto loadedfm
goto fmerror
:loadedfm
set LOADEDFM=1
:fmloaded
fe -lweird1.pat do fmset $i > nul
bo
goto quit
:weirdoff
fm -qs
if not errorlevel 1 goto nofm
bf
if not "%LOADEDFM%" == "1" goto quit
fm -qu
:nofm
set LOADEDFM=
goto quit
:syntax
echo Syntax: weird on or weird off
echo This program makes weird sounds in the background.
echo Look at the end of WEIRD.BAT to read what it does and how.
goto quit
:fmerror
echo Error loading FM.COM. Unable to continue.
goto quit
:nofm
echo Sorry, but the TSR is not loaded.
goto quit
:quit
:: This is the WEIRD.BAT file
:: What it does is this:
:: if no argument given, display syntax and quit.
:: if invoked as "weird on", then activate weird sounds.
:: if invoked as "weird off", then deactivate the weird sounds.
::
:: WEIRD ON
:: First, check to see if the FM.COM TSR is already loaded.
:: If so, then skip the loading procedure.
:: Otherwise, load FM.COM, and error out if it failed to load.
:: Use a 64 (-n64) entry queue to minimize memory utilization.
:: Then, set an environment variable indicating that we loaded FM.COM.
:: Then, for each line in the Pattern File, set the instrument timbre.
:: Finally, activate background sounds, and quit.
::
:: WEIRD OFF
:: First, check to see if the FM.COM TSR is loaded.
:: If it is not, error out.
:: Otherwise, turn off the background sounds.
:: If the environment variable is not set to our key, then quit.
:: Otherwise, unload the TSR and unset the variable.
::
:: Utility Programs
::
:: FE.EXE - utility to execute multiple commands on a series of values.
:: Includes the ability to modify the values (:u -> make uppercase).
:: Also, can read a list file (-lfilename) for values.
::
:: FM.COM - TSR to control the FM-chip on your sound board.
:: Installs (-i) and uninstalls (-u), with no display (-q).
::
:: BO.COM - Activate background sounds in FM.COM.
:: BF.COM - Deactivate background sounds in FM.COM.
::
:: FMSET.EXE - Set Voice Timbre Parameters. Used with FE.EXE to set each
:: voice to a specified timbre. Modify the WEIRD1.PAT file to change
:: the instrument sound.
::